function [ patronExp, patronTanh, respuestaExp, respuestaTanh  ] = preProcessInputs( window)

WINDOW = window;
%samples3;
load trainingSamples.mat
samples = trainingSamples;

N = size(samples,1) - (WINDOW - 1);

MIN_EXP = 0;
MAX_EXP = 1;
MIN_TANH = -1;
MAX_TANH = 1;

sample_max = max(samples(:,1));
sample_min = min(samples(:,1));

for i=1:N
    for j=1:WINDOW
            x = samples(i+j-1,1);
            patronExp(i,j) = normalize( x, sample_min, sample_max , MIN_EXP, MAX_EXP );
            patronTanh(i,j) = normalize( x, sample_min, sample_max , MIN_TANH, MAX_TANH );
            aux(j) = samples(i+j-1,2);
    end
    respuesta(i) = calcExpectedOutput(aux);
    respuestaExp(i) = respuesta(i);
    if respuesta(i) == 0
        respuestaTanh(i) = -1;
    else
        respuestaTanh(i) = 1;
    end
end

end